Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

✨ [WIP] Support multiple inputs #234

Closed
wants to merge 1 commit into from
Closed

Conversation

aufi
Copy link
Member

@aufi aufi commented May 15, 2024

Adding "feature" to support multiple inputs for kantra. That allows running analysis of multiple applications within a single kantra call and having results in a single statis report.

Limitations:

  • analyses are executed serially one after another and there is no plan on making it paralel (use full Konveyor if need this)
  • all options (like labels, rules) are shared for all inputs (again, no plan on supporting per-input labels etc., use full Konveyor if needed)

Since the multiple input analysis execution might take a while, static report is re-generated after each application analysis. Analysis YAML results and log are stored in single output directory in files with name suffix based on input name.

Single-input analysis output structure is not changed.

TODOs:

  • include dependencies files in outputs
  • optimize repeated execution of provider detection&related stuff setup and cleanup
  • ensure correct handling of input directories (and the same input basenames)
  • consider support input dir kantra argument with multiple applications if needed

Work in progress, but works for me locally with 2 ear application inputs.

Related to konveyor/enhancements#194

Adding "feature" to support multiple inputs for kantra. That allows
running analysis of multiple applications within a single kantra call
and having results in a single statis report.

Limitations:
- analyses are executed serially one after another and there is _no_
  plan on making it paralel (use full Konveyor if need this)
- all options (like labels, rules) are shared for all inputs (again no
  plan on supporting per-input labels etc., use full Konveyor if needed)

Since the multiple input analysis execution might take a while, static
report is re-generated after each application analysis. Analysis YAML
results and log are stored in single output directory in files with
name suffix based on input name.

Single-input analysis output structure is not changed.

TODOs:
- include dependencies files in outputs
- consider support `input dir` with multiple applications if needed
- optimize repeated execution of provider containers&related stuff setup and cleanup

Fixes: https://github.com/konveyor/kantra/issues/180

Signed-off-by: Marek Aufart <[email protected]>
@aufi aufi marked this pull request as draft May 15, 2024 12:50
@aufi
Copy link
Member Author

aufi commented May 28, 2024

The original plan we discussed in analyzer team was sligthly more "hidden" multiple inputs functionality, but that has much more negative impact to users than on source code IMO.

If we continue with approach single kantra call is single application analysis , I'd like suggest another solution adding just a --combined (or --bulk) output option which will re-use output directory and generate static report for all analysis results present in the directory. That could be scripted for multiple analyses by users/consultants (should satisfy users) and would not break single input directory structure (analysis log would be used as a lock file and completed analysis files would be moved to names with suffix based on input name).

aufi added a commit to aufi/kantra that referenced this pull request May 31, 2024
It was requested to allow multiple inputs for kantra analyze command.
Full multiple inputs support (or a limited/hidden input-bin directory
support) would bring unwanted complications for codebase and unwanted usage of kantra
tool instead of using Konveyor Hub (discussed in eng team).

It looks much cleaner to me to state in README, that kantra analyze
is intentionaly a single input command, but allow script multiple inputs
analysis on user-side with --bulk command option, that allows run
mutliple analysis into the same output directly and create a combined
static report.

Related to
- https://github.com/konveyor/kantra/issues/180
- konveyor#234 (alternative)

Signed-off-by: Marek Aufart <[email protected]>
@aufi
Copy link
Member Author

aufi commented May 31, 2024

Added an alternative PR #250 (that I like much more than this multile input or input-bin directory solution), but I'm ready finish this with input-bin dir if required.

@eemcmullan eemcmullan added the do-not-merge/work-in-progress A PR should not be merged as it is a work in progress label Jun 3, 2024
aufi added a commit that referenced this pull request Jun 18, 2024
Support multiple inputs with bulk option

It was requested to allow multiple inputs for kantra analyze command.
Full multiple inputs support (or a limited/hidden input-bin directory
support) would bring unwanted complications for codebase and unwanted usage of kantra
tool instead of using Konveyor Hub (discussed in eng team).

It looks much cleaner to me to state in README, that kantra analyze
is intentionaly a single input command, but allow script multiple inputs
analysis on user-side with --bulk command option, that allows run
mutliple analysis into the same output directly and create a combined
static report.

Related to
- https://github.com/konveyor/kantra/issues/180
- #234 (alternative)

Signed-off-by: Marek Aufart <[email protected]>
Signed-off-by: Marek Aufart <[email protected]>
@aufi aufi closed this Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/work-in-progress A PR should not be merged as it is a work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants